package cn.hl.hm.constants;

import org.apache.commons.lang3.StringUtils;

/**
 *  司机工作状态 :
 *  2.接单中
 *  1.空闲中
 *  3.离线
 * @author 大和
 *
 */
public enum DriverWorkStatus {

	BUSY("2","接单中"),
	FREE("1","空闲中"),
	OFFLINE("3","离线");
	private String status;
	
	private String name;
	
	DriverWorkStatus(String status,String name){
		this.name = name;
		this.status = status;
	}
	
	
	public static DriverWorkStatus getUserStatus(String status){
		if (StringUtils.isBlank(status)) {
			return null;
		}
		for (DriverWorkStatus pm : values()) {
			if (pm.status.equals(status)) {
				return pm;
			}
		}
		return null;
	}


	public String getName() {
		return name;
	}


	public String getStatus() {
		return status;
	}
	public static void main(String[] args) {

	}
}
